// @ts-ignore
/* eslint-disable */
import request from '@/request'

/** 删除用户地址 GET /api/userAddress/deleteUserAddress/${param0} */
export async function deleteUserAddressUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteUserAddressUsingGETParams,
  options?: { [key: string]: any }
) {
  const { addressId: param0, ...queryParams } = params
  return request<API.Void_>(`/api/userAddress/deleteUserAddress/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  })
}

/** 分页查询用户地址 POST /api/userAddress/pageUserAddress */
export async function pageUserAddressUsingPost(body: API.PageRequest, options?: { [key: string]: any }) {
  return request<API.IPageUserAddressVO_>('/api/userAddress/pageUserAddress', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 新增用户地址 POST /api/userAddress/saveUserAddress */
export async function saveUserAddressUsingPost(body: API.UserAddressDTO, options?: { [key: string]: any }) {
  return request<API.Void_>('/api/userAddress/saveUserAddress', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 修改用户地址 POST /api/userAddress/updateUserAddress */
export async function updateUserAddressUsingPost(body: API.UserAddressDTO, options?: { [key: string]: any }) {
  return request<API.Void_>('/api/userAddress/updateUserAddress', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
